<template>
  <div>
    <h1>商品列表</h1>
    <ul>
      <li v-for="item in goods" :key="item">
        <router-link
          :to="'/detail/'+item+'?name='+name+'&age='+age"
        >{{item}}</router-link>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      goods: ['iphone', 'hauwei', 'xiaomi'],
      name: 'Tom',
      age: 30
    }
  },
}
</script>
<style lang="">
  .side {
    height: 100vh;
    width: 200px;
    background-color: #333;
    position: absolute;
    top: 0;
  }
  .side a {
    color: aliceblue;
  }
</style>